create or replace package admassist.cust_hsd_attendance is

--transform any absence into one of four types: (U)nexcused, (E)xcused, (A)uthorized, ANY
function absence_type
(
   in_absent_code in varchar2,
   in_reason_code in varchar2,
   in_school number
) return varchar2;

--number of scheduled total course minutes from all schools on a day
function sec_day_course_min_total
(
   in_pupil_number in number,
   in_date date
) return number;

--Percent of minutes absent on a day
function sec_att_day_percent
(
   in_pupil_number in number,
   in_absent_code in varchar2, --A, L
   in_absence_type in varchar2, --A, U, E
   in_date in date
) return number;

--number of days absent in a range of days
function sec_att_day_range_count
(
   in_pupil_number in number,
   in_absence_type in varchar2,
   in_start_date in date,
   in_end_date in date
) return number;

--number of days absent in a range of days
function elem_att_day_range_count
(
   in_pupil_number in number,
   in_absence_type in varchar2,
   in_start_date in date,
   in_end_date in date
) return number;

--number of days absent in a range of days, regardless of period or daily source data
function stu_att_day_range_count
(
   in_pupil_number in number,
   in_absence_type in varchar2,
   in_start_date in date,
   in_end_date in date
)
return number;

end;
/
